//
//  PayParkingDetController.m
//  PropertyMananger
//
//  Created by bh on 17/4/6.
//  Copyright © 2017年 BH. All rights reserved.
//

#import "PayParkingDetController.h"
#import "CheckFormDetailCell.h"


@interface PayParkingDetController ()

@end

@implementation PayParkingDetController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self initTitleViewName:@"停车缴费查询详情"];
    [self initTableViewWithView:self.view frame:CGRectMake(0, 0, BHscreenW, BHscreenH -64) isGroup:NO];
    
    self.tableView.backgroundColor = BHGrayColor;
    
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 8;
    
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    CheckFormDetailCell * cell = [CheckFormDetailCell cellWithTableView:tableView];
    
    if (indexPath.row == 0) {
        
        self.titleStr = @"缴费类型:";
        self.pingjieStr = [NSString stringWithFormat:@"%@  %@",self.titleStr,@"停车费"];
        
        self.stra = [[NSMutableAttributedString alloc]initWithString:self.pingjieStr];//可随意拼接字符串
        [self.stra addAttributes:@{NSFontAttributeName:BHFont(15),NSForegroundColorAttributeName:BHColor(102, 102, 102)} range:NSMakeRange(0, self.titleStr.length)];
        cell.infoLabel.attributedText = self.stra;
        
    }else if (indexPath.row == 1){
        
        self.titleStr = @"车牌号:";
        self.pingjieStr = [NSString stringWithFormat:@"%@ %@",self.titleStr,self.model.CarNo];
        
        self.stra = [[NSMutableAttributedString alloc]initWithString:self.pingjieStr];//可随意拼接字符串
        [self.stra addAttributes:@{NSFontAttributeName:BHFont(15),NSForegroundColorAttributeName:BHColor(102, 102, 102)} range:NSMakeRange(0, self.titleStr.length)];
        cell.infoLabel.attributedText = self.stra;
        
    }else if (indexPath.row == 2){
        self.titleStr = @"车主姓名:";
        self.pingjieStr = [NSString stringWithFormat:@"%@  %@",self.titleStr,self.model.Expr1];
        
        self.stra = [[NSMutableAttributedString alloc]initWithString:self.pingjieStr];//可随意拼接字符串
        [self.stra addAttributes:@{NSFontAttributeName:BHFont(15),NSForegroundColorAttributeName:BHColor(102, 102, 102)} range:NSMakeRange(0, self.titleStr.length)];
        cell.infoLabel.attributedText = self.stra;
        
    }else if (indexPath.row == 3){
        
        self.titleStr = @"开始缴费时间:";
        self.pingjieStr = [NSString stringWithFormat:@"%@  %@",self.titleStr,self.model.StartTime];
        
        self.stra = [[NSMutableAttributedString alloc]initWithString:self.pingjieStr];//可随意拼接字符串
        [self.stra addAttributes:@{NSFontAttributeName:BHFont(15),NSForegroundColorAttributeName:BHColor(102, 102, 102)} range:NSMakeRange(0, self.titleStr.length)];
        cell.infoLabel.attributedText = self.stra;
        
    }else if (indexPath.row == 4){
        
        self.titleStr = @"截止缴费时间:";
        self.pingjieStr = [NSString stringWithFormat:@"%@  %@",self.titleStr,self.model.EndTime];
        
        self.stra = [[NSMutableAttributedString alloc]initWithString:self.pingjieStr];//可随意拼接字符串
        [self.stra addAttributes:@{NSFontAttributeName:BHFont(15),NSForegroundColorAttributeName:BHColor(102, 102, 102)} range:NSMakeRange(0, self.titleStr.length)];
        cell.infoLabel.attributedText = self.stra;
    }else if (indexPath.row == 5){
        
        self.titleStr = @"缴费状态:";

        self.pingjieStr = [NSString stringWithFormat:@"%@  %@",self.titleStr,@"已缴费"];
        
        self.stra = [[NSMutableAttributedString alloc]initWithString:self.pingjieStr];//可随意拼接字符串
        [self.stra addAttributes:@{NSFontAttributeName:BHFont(15),NSForegroundColorAttributeName:BHColor(102, 102, 102)} range:NSMakeRange(0, self.titleStr.length)];
        cell.infoLabel.textColor = [UIColor redColor];
        cell.infoLabel.attributedText = self.stra;
    }else if (indexPath.row == 6){
        
        self.titleStr = @"缴费金额:";
        self.pingjieStr = [NSString stringWithFormat:@"%@  %@",self.titleStr,self.model.PayMoney];
        
        self.stra = [[NSMutableAttributedString alloc]initWithString:self.pingjieStr];//可随意拼接字符串
        [self.stra addAttributes:@{NSFontAttributeName:BHFont(15),NSForegroundColorAttributeName:BHColor(102, 102, 102)} range:NSMakeRange(0, self.titleStr.length)];
        cell.infoLabel.textColor = [UIColor redColor];
        cell.infoLabel.attributedText = self.stra;
        
    }else if (indexPath.row == 7){
        
        self.titleStr = @"缴费方式";
        self.pingjieStr = [NSString stringWithFormat:@"%@  %@",self.titleStr,self.model.CarPayWayName];
        
        self.stra = [[NSMutableAttributedString alloc]initWithString:self.pingjieStr];//可随意拼接字符串
        [self.stra addAttributes:@{NSFontAttributeName:BHFont(15),NSForegroundColorAttributeName:BHColor(102, 102, 102)} range:NSMakeRange(0, self.titleStr.length)];
        cell.infoLabel.attributedText = self.stra;
    }
    
    return cell;
    
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 50;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
   
    
}


@end
